package com.design.pattern.proxy.statics;

/**
 * 房屋中介[代理]
 */
public class RoomMedium implements AboutRoomPerson {
    AboutRoomPerson person;

    public RoomMedium(AboutRoomPerson person) {
        this.person = person;
    }

    @Override
    public void sale(Integer money) {
        if (money<600){
            System.out.println("买主给价太低,不通知房东,拒绝交易!");
            return;
        }
        System.out.println("买主出价符合房东要求,联系房东.");
        person.sale(money);
    }
}
